﻿/*****************************************************************//**
 * @file    FITKViewAdaptorGeoInstance.h
 * @brief   Adaptor for geometry instance command data.
 *  
 * @author  ChengHaotian (yeguangbaozi@foxmail.com)
 * @date    2024-11-27
 *********************************************************************/

#ifndef __FITKVIEWADAPTORGEOINSTANCE_H__
#define __FITKVIEWADAPTORGEOINSTANCE_H__

#include "FITKVTKViewAdaptorBase.h"

#include "FITKVTKGraphAdaptorAPI.h"

namespace Exchange
{
    /**
     * @brief   Graph object data adaptor for 'geometry command'.
     * @author  ChengHaotian (yeguangbaozi@foxmail.com)
     * @date    2024-11-27
     */
    class FITKVTKGRAPHADAPTORAPI FITKViewAdaptorGeoInstance : public FITKVTKViewAdaptorBase
    {
        // Regist
        FITKCLASS(Exchange, FITKViewAdaptorGeoInstance);

    public:
        /**
         * @brief   Constructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-27
         */
        explicit FITKViewAdaptorGeoInstance() = default;

        /**
         * @brief   Destructor.
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-27
         */
        ~FITKViewAdaptorGeoInstance() = default;

        /**
         * @brief   Execute the data exchange.[override]
         * @return  Is OK
         * @author  ChengHaotian (yeguangbaozi@foxmail.com)
         * @date    2024-11-27
         */
        bool update() override;

    };

    // Regist geometry instance M4 command adaptor
    Register2FITKViewAdaptorFactory(GeoInstance, Interface::FITKAssemblyInstanceM4, FITKViewAdaptorGeoInstance, 1);

    // Regist geometry instance TR command adaptor
    Register2FITKViewAdaptorFactory(GeoInstance, Interface::FITKAssemblyInstanceTR, FITKViewAdaptorGeoInstance, 2);

    // Regist geometry custom instance command adaptor
    Register2FITKViewAdaptorFactory(GeoInstance, Interface::FITKAssemblyInstance, FITKViewAdaptorGeoInstance, 3);
}   // namespace Exchange

#endif // __FITKVIEWADAPTORGEOINSTANCE_H__